#ifndef BUFFDEF_H__
#define BUFFDEF_H__
#include "SimpleRefection.h"
#include "MgrBase.h"

struct ValueModifier
{
	EValueModifyer m_eModifier;
	double m_fAddValue;
	double m_fAddPercent;
};
struct BuffDef:public ReflectionBase
{
	DECL_REFLECTION(BuffDef,"../../config/BuffDef.xml");
	int32 m_iID;
	int32 m_iBuffType;
	std::string m_sDisplayName;
	std::string m_sGameName;
	
	int32 m_iLvl;
	bool m_bForCombat;
	bool m_bCoutTimeOffLine;
	bool m_bIsShowOnClient;
	bool m_bIsSaveToDB;
	int32 m_iClientResID;
	EBuffCountTimeMod m_eCountTimeMod;
	int32 m_iDurationSec;
	std::string  m_sEndTimePoint;

	
	EValueModifyer m_eModifier1;
	double m_fAddValue1;
	double m_fAddPercent1;
	EValueModifyer m_eModifier2;
	double m_fAddValue2;
	double m_fAddPercent2;

	std::vector<int32> m_vExcludeTypes;
	bool m_bReplaceByLvlWhenSameType;

	std::string m_sDesc;
	
	int32 m_iEndTimePoint;
	rewrite virtual void OnArchieveReaded();
	std::vector<ValueModifier> m_vModifiers;
};
typedef DefMangerTpl<BuffDef> BuffDefManager;


#endif